﻿using LDM.Sys.ServiceAPI.Model.DBModel;
using LDM.Sys.ServiceAPI.Model.ViewModel.Request.AuthorityReq;
using Microsoft.Extensions.DependencyInjection;
using Model.Models;
using Utility.Domains.Repositories;

namespace User.Repositories.Repository.Interfaces
{
    /// <summary>
    /// 用户接口
    /// </summary>
    public interface IWxAccountRepository : IBaseRepository<WxAccount>, IScoped
    {
        #region 微信相关
        /// <summary>
        /// 获取邮件或者email是否被注册
        /// </summary>
        WxAccount GetSendEmailByEmailName(string phone, string email);


        /// <summary>
        /// 获取邮件或者email是否被注册
        /// </summary>
        WxAccount GetUserLogin(string phone, string email, string password);


        /// <summary>
        /// 根据opendid获取用户信息
        /// </summary>
        WxAccount GetUserByOpenId(string openid);

        /// <summary>
        /// 根据userid获取用户信息
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        WxAccount GetUserInfo(string userid);
        #endregion
    }
}
